package com.bw.zg3.Cate.C1

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import com.alibaba.android.arouter.facade.annotation.Route
import com.bw.base.mvvm.BaseActivity
import com.bw.zg3.R
import com.bw.zg3.databinding.ActivityClactivityBinding
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch

@AndroidEntryPoint
@Route(path="/app/CLActivity")
class CLActivity :BaseActivity<ActivityClactivityBinding,ClViewModel>() {

        val clApter by lazy { CLApter() }
    override fun initView() {
        binding.rv.apply {
            adapter=clApter
        }
        lifecycleScope.launch {
            vm.getCl().collect{
                clApter.submitData(it)
            }
        }

    }

    override fun intiData() {

    }
}